package net.forsuber.tests;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * User: lzap
 * Date: 28.7.2007
 * Time: 0:26:13
 */
public class RegexpTest {

    public static void main(String args[]) {
        String str = "name=\"form_token\" id=\"edit-clanek-node-form-form-token\" value=\"90c5929df40581b6d28e707a83466f66\"  />";
        Pattern p = Pattern.compile("value=\"[a-f0-9]{32}\"");
        Matcher m = p.matcher(str);

        if (m.find()) {
            System.out.println(str.substring(m.start() + 7, m.end() - 1));
        } else {
            System.out.println("NOT MATCHED!");
        }

    }
}
